{% extends "templates/base.html" %}

{% block title%}Home{% endblock %}

{% block main %}

<blockquote>
	<p>why drive by yourself, have some company, save on petrol for yourself and others....</p>
</blockquote>

<a name="RoadMate"></a>
	<h2>RoadMate it!!</h2>

	<p>
		<strong>Our</strong> aim is to provide the community with a car pooling service that will facilitate
		traveling. Why not to share a ride and save yourself and others the rising costs of
		petrol and also it's good to have some company during travel, especially if you are traveling for long
		hours... So <a href="{{ login_url }}">Log in</a> today and join our community.
	</p>

	<p>Good luck and we hope you enjoy the experience!</p>

	<h3>where to from here</h3>
	<div class="options">
		<ul>
			<li><a href="/profile">Create a profile</a> and build your online identity.</li>
			<li><a href="/ride_create">Create a ride offer</a> and start working on your ride-sharing karma.</li>
			<li><a href="/browse_rides">Browse all rides</a> and find a roadmate.</li>
		</ul>
	</div>
<p/>
{% if rides %}
	<h2>latest offered rides</h2>
	<table class="roadmate-list">
			{% for ride in rides %}
				<tr class="list-item">
				    <tr class="list-row">
				        {% if not ride.is_full %}<th rowspan="2" class="list-header"></th>{% else %}<th rowspan="2" class="list-header-red"></th>{% endif %}
		    			<td> {{ride.date|date_for_table }}</td>
		     			<td> {{ride.owner.get_name_tag}} </td>
		     			<td> {{ride.status}} </td>
					</tr>
				    <tr class="list-row">
					    <td colspan=3><strong><a href="/ride?id={{ ride.key.id }}">{{ ride.get_name }}</strong></a>
						</td>
					</tr>
				</tr> <!-- end list item -->

			{% endfor %}
	</table>
{% endif %}

{% endblock %} <!-- end block main -->
